package com.rockcent.mall.lib.repository;

import com.rockcent.mall.lib.domain.ProductShare;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by zhangjh 2016/10/24.
 */
@Repository
public interface ProductShareRepository extends JpaRepository<ProductShare, Long>, JpaSpecificationExecutor,ProductShareRepositoryCustom {

    ProductShare findBySharedCustomerIdAndProductId(Long customerId,Long productId);

    List<ProductShare> findBySharedCustomerIdAndProductIdIn(Long id, List<Long> ids);
}
